#ifndef NETWORK_ERROR_HANDLER_CLIENT_HH
# define NETWORK_ERROR_HANDLER_CLIENT_HH

# include <network/network-error-handler.hh>

class NetworkErrorHandlerClient: public NetworkErrorHandler
{
public:
  NetworkErrorHandlerClient ();

  //read errors                                                                                                                                                                                                                              
  virtual boost::shared_ptr<Request> readFail (const std::exception& e);
  virtual boost::shared_ptr<Request> readWrongSize (int numread, int toread);
  virtual std::string rawReadFail (const std::exception& e);

  //write errors                                                                                                                                                                                                                             
  virtual void sendFail (const std::exception& e);

  void disconnecting (bool val) { disconnecting_ = val; }

protected:
  bool disconnecting_;
};

#endif /// !NETWORK_ERROR_HANDLER_CLIENT_HH
